package com.daiyang.messagewall.mapper;



import com.daiyang.messagewall.Model.Message;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageInfoMapper  {
    @Select("select `id`, `from`, `to`, `message` from message_info where delete_flag=0")
    List<Message> queryAll();
    @Insert("insert into message_info (`from`,`to`, `message`) values(#{from},#{to},#{message})")
    Integer addMessage(Message message);
}
